package game.engine.field;

import game.element.actor.Actor;

public class Wind implements Field {

	public static final String TYPE = "WIND";
	public static final int MAX_STRENGTH = 5;

	private final int stregth;

	public Wind(int strength) {

		if (strength > MAX_STRENGTH) {
			this.stregth = MAX_STRENGTH;
		} else if (strength < -MAX_STRENGTH) {
			this.stregth = -MAX_STRENGTH;
		} else {
			this.stregth = strength;
		}
	}

	@Override
	public void doMove(Actor actor) {
		actor.setX(actor.getX() + stregth);
	}

}
